<!--
 * @: 
 * @Version: 1.0
 * @Autor: ziwei
 * @Date: 2021-10-15 16:47:03
 * @LastEditors: ziwei
 * @LastEditTime: 2021-10-17 15:14:53
-->
<template>
  <div>
    FOO
    <button @click="clickMe">1点击</button>
  </div>
</template>

<script>
export default {
  asyncData(store) {//asyncData这个方法只在服务端执行的 并且只在页面组件中执行
    return store.dispatch('changeName')
  },
  methods: {
    clickMe() {
      console.log(11111);
      alert("点击");
    },
  },
};
</script>

<style></style>
